<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p v-text='username'></p>
        <!-- v-text会覆盖元素内部默认值 -->
        <p v-text='gender'>性别</p>

        <hr>

        <p>姓名：{{username}}</p>
        <p>性别：{{gender}}</p>

        <hr>

        <div v-text='info'></div>
        <div>{{info}}</div>
        <div v-html="info"></div>

    </div>

    <script src="./lib/vue-2.6.12.js"></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data: {
                username: 'ls',
                gender: '女',
                info: '<h4 style = "color:red;font-weight:bold">学习vue.js</h4>'
            }
        })

    </script>
</body>

</html>